package com.plat.mapper.user;

import com.plat.mapper.AbstractParamEntity;
import com.plat.mapper.DBColumn;

import java.time.LocalDateTime;

/**
 * @author carter
 * create time    2018-08-18
 *
 *
 create table user (id int auto_increment primary key , username varchar(30) not null , password varchar(64) not null,
    age tinyint not null, sex_enum tinyint not null,
`create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP  comment '添加时间',
`update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '任意数据更新时间'
);
 */
public class UserEntity extends AbstractParamEntity {

    @DBColumn
    private Integer id;
    @DBColumn
    private String  username;
    @DBColumn
    private String  password;
    @DBColumn
    private Integer age;
    @DBColumn
    private SexEnum sexEnum;
    @DBColumn
    private LocalDateTime createAt;
    @DBColumn
    private LocalDateTime updateAt;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public SexEnum getSexEnum() {
        return sexEnum;
    }

    public void setSexEnum(SexEnum sexEnum) {
        this.sexEnum = sexEnum;
    }

    public LocalDateTime getCreateAt() {
        return createAt;
    }

    public void setCreateAt(LocalDateTime createAt) {
        this.createAt = createAt;
    }

    public LocalDateTime getUpdateAt() {
        return updateAt;
    }

    public void setUpdateAt(LocalDateTime updateAt) {
        this.updateAt = updateAt;
    }

    @Override
    public Integer getId() {
        return id;
    }

    @Override
    public String getTable() {
        return "user";
    }

    @Override
    public void setId(Integer start) {
        this.id = id;
    }
}

